#pragma once

#include "ft2build.h"
#include FT_FREETYPE_H
#include FT_GLYPH_H

class AutoGlyph
{
public:
	AutoGlyph()
		: data(0)
	{ }

	FT_Glyph& get()
	{
		return data;
	}

	~AutoGlyph()
	{
		if (data)
			FT_Done_Glyph(data);
	}
private:
	FT_Glyph data;
};
